home *** CD-ROM | disk | FTP | other *** search
- /*
- * Octopus, The Atari ST(e)/TT/Falcon GEM/TOS Bulletin Board System
- * written by me (Koos Kuil) on FidoNet: 2:282/397, NeST: 90:500/103
- *
- * Example English OctoScript file written on 03 March 1995 by
- * Koos Kuil to demostrate easy language selecting.
- * ------------------------------------------------------------------
- * LANGUAGE.SCR Loading language files, more languages can be
- * set easyely later.
- *
- * We are using some userkeys to select the right language, for 8
- * languages we can use 3 bits. For more languages more bits are
- * required. In this example userkey 1, 2 and 3 are used.
- *
- * :ask_language Asks the user for a language, menu ASKLANG
- * is send in Convert mode to show possibilitys.
- * :get_language Loads the setted language, when not available
- * no language is loaded so you can use it without
- * changes if you don't want to do this.
- *
- * Format: (1) 0 0 0 English OCTOPUS.ENG
- * (2) 0 0 1 German OCTOPUS.GER
- * (3) 0 1 0 Dutch OCTOPUS.NED
- * (4) 0 1 1 Svenska OCTOPUS.SWE
- * (5) 1 0 0 Polish OCTOPUS.POL
- * (6) 1 0 1 Italian OCTOPUS.ITA
- * (7) 1 1 0 French OCTOPUS.FRE
- * (8) 1 1 1 Fries OCTOPUS.FRI
- * ^ ^ ^
- * | | +-- UserKey 1
- * | +----- UserKey 2
- * +-------- Userkey 3
- */
- :ask_language
- ClrUserKey 1 /* Reset current language to English */
- ClrUserKey 2
- ClrUserKey 3
- Do
- Convert AskLang
- DoChoice
- SelectChoice
- Case 2 SetUserKey 1
- Case 3 SetUserKey 2
- Case 4 SetUserkey 1 SetUserKey 2
- Case 5 SetUserKey 3
- Case 6 SetUserKey 1 SetUserKey 3
- Case 7 SetUserKey 2 SetUserKey 3
- Case 8 SetUserKey 1 SetUserKey 2 SetUserKey 3
- EndSelect
- EnddoChoice 12345678
- Enddo 12345678
- Gosub get_language
- Return
-
- /* Load the selected language, in Octopus v0.63 it's not
- * yet possible to calculate so we are doing it a little
- * bit on the not usable way but it works correctly in
- * practical environment.
- */
- :get_language
- IfUserKey 1
- IfUserKey 2
- IfUserKey 3
- LoadLanguage OCTOPUS.FRI /* 7 */
- Else
- LoadLanguage OCTOPUS.SWE /* 3 */
- Endif
- Else
- IfUserKey 3
- LoadLanguage OCTOPUS.ITA /* 6 */
- Else
- LoadLanguage OCTOPUS.GER /* 1 */
- Endif
- Endif
- Else
- IfUserKey 2
- IfUserKey 3
- LoadLanguage OCTOPUS.FRE /* 5 */
- Else
- LoadLanguage OCTOPUS.NED /* 2 */
- Endif
- Else
- IfUserKey 3
- LoadLanguage OCTOPUS.POL /* 4 */
- Else
- LoadLanguage OCTOPUS.ENG /* 0 */
- Endif
- Endif
- Endif
- Return
-
- /* End LANGUAGE.SCR */